#!/bin/bash

cpp -Wp,-MD,x.pre.tmp -nostdinc -I. -Iinclude  -undef -D__DTS__ -x assembler-with-cpp -o x.dts.tmp  am335x-boneblack.dts

dtc -I dts -O dts -o x.dts x.dts.tmp

dtc -I dts -O dtb -o am335x-boneblack.dtb x.dts

rm -f x.dts x.dts.tmp x.pre.tmp

mv /boot/am335x-boneblack.dtb /boot/bk_am335x-boneblack.dtb
cp am335x-boneblack.dtb /boot/
